package com.rachel.testjetpack;

import android.app.Application;
import android.util.Log;

public class AppApplication extends Application {

    private String TAG="AppApplication";

    @Override
    public void onCreate() {
        super.onCreate();

        ForegroundCallbacks.init(this).addListener(new ForegroundCallbacks.Listener() {
            @Override
            public void onBecameForeground() {
                Log.d(TAG, "onBecameForeground: 在前台");
            }

            @Override
            public void onBecameBackground() {
                Log.d(TAG, "onBecameBackground: 在后台");
            }
        });
    }
}
